package com.ysxsoft.wdg.adapter.my;


import android.graphics.Color;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.bean.response.TxHistoryResponse;
import com.ysxsoft.wdg.util.ViewUtils;

public class TxHisAdapter extends BaseQuickAdapter<TxHistoryResponse.DataBean, BaseViewHolder> {



    public TxHisAdapter(int layoutResId) {
        super(layoutResId);
    }

    public void clear() {
        getData().clear();
        notifyDataSetChanged();
    }


    @Override
    protected void convert(BaseViewHolder helper, TxHistoryResponse.DataBean item) {

//        ViewUtils.loadCircleImage(mContext,,(ImageView) helper.getView(R.id.iv_tx));

        helper.setText(R.id.tv_name,"提现到支付宝");
//        helper.setText(R.id.tv_money_name,item.getAlicode());
        helper.setText(R.id.tv_money,item.getAccount());
        helper.setText(R.id.tv_time,item.getAddtime());
        helper.setText(R.id.tv_status,item.getStatus());
        TextView textView=helper.getView(R.id.tv_status);
        if("审核中".equals(item.getStatus())){
            textView.setTextColor(Color.parseColor("#f8b45d"));
        }else{
            textView.setTextColor(Color.parseColor("#666666"));
        }
    }
}
